/*
package Test5;

import java.util.Random;

    public class Test {
        public static void main(String[] args) {
            int[] a = new int[10];
            Random r = new Random();
            for (int i = 0; i < a.length; i++) {
                r.setSeed(i + System.currentTimeMillis());
                a[i] = r.nextInt(100);
            }
            ArrayReverser reverser = null;
            try {
                reverser = new ArrayReverser(a);
            } catch (IllegalArgumentException e) {
                throw new RuntimeException(e);
            }
            System.out.println(reverser);
            reverser.reverse();
            System.out.println(reverser);
            double[][] mm1 = {{1,2},{3,4}};
            Matrix m1 = null;
            try {
                m1 = new Matrix(mm1);
            } catch (IllegalArgumentException e) {
                throw new RuntimeException(e);
            }
            System.out.println(m1);
            double[][] mm2 = {{5,6},{7,8}};
            Matrix m2 = null;
            try {
                m2 = new Matrix(mm2);
            } catch (IllegalArgumentException e) {
                throw new RuntimeException(e);
            }
            try {
                System.out.println(m1.multiply(m2).toString());
            } catch (MatrixMultiplicationException | IllegalArgumentException e) {
                System.out.println(e.getMessage());
            }
            double[][] mm3 = {{1,2,3},{3,4,0},{5,6,7}};
            // System.out.println(mm3[0].length);
            Matrix m3 = null;
            try {
                m3 = new Matrix(mm3);
            } catch (IllegalArgumentException e) {
                throw new RuntimeException(e);
            }
            try {
                Matrix result = m2.multiply(m3);
                System.out.println(result);
            } catch (MatrixMultiplicationException e) {
                System.out.println(e.toString());
            } catch (IllegalArgumentException e) {
                throw new RuntimeException(e);
            }
            try {
                Matrix m4 = new Matrix(-1,-1);
            } catch (IllegalArgumentException e) {
                System.out.println(e.toString() );
            }
        }
    }

*/
